package com.hdcircles.autoform.model.http;

import com.hdcircles.autoform.model.bean.ChooseQuestionBean;
import com.hdcircles.autoform.model.bean.FormBean;
import com.hdcircles.autoform.model.bean.HttpBody;
import com.hdcircles.autoform.model.bean.QuestionBean;
import com.hdcircles.autoform.model.bean.User;

import java.util.List;

import retrofit2.http.Body;
import retrofit2.http.POST;
import rx.Observable;

/**
 *
 * Created by hdcircles on 2016/11/10.
 */

interface FormApis {

//    String HOST="http://104.199.134.245/formapp/Service1.svc/";//外网地址
    String HOST="http://192.168.0.101:8888/ws01/Service1.svc/";//公司地址


    @POST("doService")
    Observable<HttpResponse<String>> addUser(@Body HttpBody body);

    @POST("doService")
    Observable<HttpResponse<String>> updateUser(@Body HttpBody body);

    @POST("doService")
    Observable<HttpResponse<User>> getUserByEmail(@Body HttpBody body);

    @POST("doService")
    Observable<HttpResponse<List<User>>> getAllUserList(@Body HttpBody body);

    @POST("doService")
    Observable<HttpResponse<List<FormBean>>> getFormList(@Body HttpBody body);

    @POST("doService")
    Observable<HttpResponse<String>> saveForm(@Body HttpBody body);

    @POST("doService")
    Observable<HttpResponse<String>> updateForm(@Body HttpBody body);


    @POST("doService")
    Observable<HttpResponse<List<QuestionBean>>> getQuestionByFormId(@Body HttpBody body);

    @POST("doService")
    Observable<HttpResponse<List<ChooseQuestionBean>>> getChoose(@Body HttpBody body);

    @POST("doService")
    Observable<HttpResponse<String>> shareForm(@Body HttpBody body);




}
